<?
/*************************************************************************************************************
**************************************************************************************************************
* Permet d'administrer les forum                                                                             *
* Programmeur : Khiguard.                                                                                    *
* Derniere mise a jour 06-07-2003                                                                            *
**************************************************************************************************************
**************************************************************************************************************/


TITRE('Tri des articles');


$query="SELECT numero_id FROM sd_sdtimes_numero ORDER BY numero_id desc LIMIT 0,1 ";
$resultat=mysql_query($query);
$post=mysql_fetch_array($resultat);

//Affichage des forums.
//------------------------------------------------------------------------------






 $tableau="<CENTER><table width=\"98%\" border=\"0\" align=\"center\" cellpadding=\"0\" cellspacing=\"0\" CLASS=\"blackfond\">
     <tr><td valign=\"middle\"><table width=\"100%\" border=\"0\" cellspacing=\"1\" cellpadding=\"0\" >

        <tr>
          <td WIDTH=\"5%\" CLASS=\"fond02\"><CENTER><B></B></CENTER></td>
          <td WIDTH=\"40%\" CLASS=\"fondro\"><CENTER><B>Titre de l'article</B></CENTER></td>
          <td WIDTH=\"7%\" CLASS=\"fond02\"><CENTER><B>Editer</B></CENTER></td>
          <td WIDTH=10 CLASS=\"fond02\"><CENTER><B>Mont.</B></CENTER></td>
          <td WIDTH=10 CLASS=\"fond01\"><CENTER><B>Desc.</B></CENTER></td>
          <td WIDTH=20% CLASS=fond01><CENTER><B>Suprimer du times</B></CENTER></td>
          
        </tr>";
    //forum

    $query="SELECT article_id, article_sujet FROM sd_sdtimes_article WHERE article_times=$post[0] ORDER BY  article_order";
    $resultat=mysql_query($query);

    //Affichage des forum
     WHILE ($forum=mysql_fetch_array($resultat)){
           SWITCH($forum[4]){
                CASE 0:
                      $icon="<img src=\"images/forum/folder.gif\" TITLE=Forum public>";
                BREAK;
                CASE 1:
                       $icon="<img src=\"images/forum/lockfolder.gif\" TITLE=Forum Priver>";
                BREAK;
           }

          
          $tableau.="<tr>
          <td WIDTH=\"5%\" CLASS=\"fond02\"><CENTER><p align=\"center\">$icon</p></CENTER></td>
          <td WIDTH=\"40%\" CLASS=\"fondro\"><a href=?p=forum_admin&t=$tropic_id[$i]&$SID target=_self CLASS=\"fondro\"><font size=\"2\">&nbsp; $forum[1]</font></a></BR>$forum[3]</td>
          <td WIDTH=\"7%\" CLASS=\"fond02\"><CENTER><a href=?p=sdtimes&cat=admin&action=edit_article&f_id=$forum[0]&$SID target=_self><font size=\"2\">Editer</font></a></CENTER></td>
          <td WIDTH=10 CLASS=\"fond02\"><CENTER><a href=\"?$SID&p=sdtimes&cat=admin&action=monter&f_id=$forum[0]&cat_id=$cat_id[$i]\" target=\"_self\"><img src=\"images/forum/sortasc.gif\" name=\"img\" border=\"0\" align=\"middle\" id=\"img\" TITLE=\"Monter l'article\"></a></CENTER></td>
          <td WIDTH=10 CLASS=\"fond01\"><CENTER><font size=\"1\"><a href=\"?$SID&p=sdtimes&cat=admin&action=descendre&f_id=$forum[0]&cat_id=$cat_id[$i]\" target=\"_self\"><img src=\"images/forum/sortdesc.gif\" name=\"img\" border=\"0\" align=\"middle\" id=\"img\" TITLE=\"descendre l'article\"></a></font></CENTER></td>

  <td WIDTH=\"20\" CLASS=\"fond01\"><CENTER><a href=?p=sdtimes&cat=admin&action=del_forum&f_id=$forum[0]&$SID target=_self><font size=\"2\">Supprimer</font></a></CENTER></td>

          </tr>";

     }//fin du while $forum




$TITRE = "Tri des articles";
base_TD($TITRE,$tableau);









?>
